'''
Created on 2017年10月7日

@author: Administrator
'''
import os


def printPath(pathStr,file_name):
    
    for x in os.listdir(pathStr):
     newPath=os.path.join(pathStr,x)
     try:
        if x.index(file_name)==0:
            print(newPath)
            break
     except  Exception as e:
        if os.path.isdir(newPath):
            printPath(newPath, file_name)



if __name__ == '__main__':
#     print(os.name)  #nt Windows系统 
#     #print(os.environ)
#     dpath=os.path.abspath(".")
#     a=os.path.join(dpath,"config")
#     #创建
#    # os.mkdir(a)
#    #删除
#     os.rmdir(a)
    printPath("F:/", "e")
    #print("abc".index("abc"))z